<?php

$config['host_address'] = 'localhost';
$config['username '] = 'bdsi';
$config['password'] = 'bdsi';
$config['name'] = 'calculadora';

function databaseQuery($query) {

    global $config;


    $link = mysql_connect($config['host_address'], $config['username '], $config['password'])
            or die('Could not connect: ' . mysql_error());


    mysql_select_db($config['name'], $link) or die('could not select database');


    $result = mysql_query($query) or die('query failed' . mysql_error());



    mysql_close($link);

    return $result;
}

?>
